package com.theme.passport.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author: 可乐加糖
 * @create: 2023-02-21 16:03
 * @Description:
 */
@Data
@ApiModel(value = "苹果IOS购买表单")
public class ApplePayForm {
    @ApiModelProperty(value = "类型不能为空，测试环境和正式环境区分", notes = "", required = true)
    @NotNull(message="类型不能为空 测试环境（0）和正式环境（1和其他都行）")
    private int type ;

    @ApiModelProperty(value = "receipt_data：需要客户端传过来的参数", notes = "", required = true)
    @NotBlank(message = "receipt_data不能为空")
    private String receipt_data ;

    @ApiModelProperty(value = "TransactionID：苹果配置的产品id", notes = "", required = true)
    @NotBlank(message = "transactionID不能为空")
    private String transaction_id ;

    @ApiModelProperty(value = "productId：购买字段吧", notes = "", required = true)
    //@NotBlank(message = "transactionID不能为空")
    private String product_id ;

    /** 要给用户增加的VIP天数 **/
    @ApiModelProperty(value = "要给用户增加的VIP月数", notes = "", required = true)
    @NotNull(message = "增加的VIP月数不能为空")
    private int months ;

    /** 购买VIP的价格，价位单位：分例如 1元 = 100分 **/
    @ApiModelProperty(value = "购买VIP的价格，价位单位：分例如 1元 = 100分", notes = "", required = true)
    @NotNull(message = "购买VIP的价格")
    private Long price; ;

    @ApiModelProperty(value = "当前用户id不用传", notes = "", required = true)
    private long userId ;

}
